<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2018/7/28 0028
 * Time: 13:55
 */
namespace app\api\controller\v1;
use app\api\model\LuckModel;
use think\Request;

class Luck
{
    /**抽奖函数
     * @param Request $request
     * @return \think\response\Json
     */
    public function luck_draw(Request $request){
        $str = LuckModel::getLuck($request);
        return json($str);
    }

    /**获取抽奖物品
     * @param Request $request
     * @return \think\response\Json
     */
    public function get_luck(Request $request){
        $str = LuckModel::get_luck($request);
        return json($str);
    }

    /**
     * @param Request $request
     * @return \think\response\Json
     */
    public function fail(Request $request){
        $str = LuckModel::fail($request);
        return json($str);
    }

    /**检测当前的答题次数
     * @param Request $request
     * @return \think\response\Json
     */
    public function newfail(Request $request){
        $str = LuckModel::newfail($request);
        return json($str);
    }
}